package org.example.design.visitor.user.impl;

import org.example.design.visitor.user.User;
import org.example.design.visitor.visitor.Visitor;

/**
 * @Classname Student
 * @Description 学生类
 * @Date 2020/11/12 2:24 下午
 * @Created by xiangjd
 */
public class Student extends User {
    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visist(this);
    }

    //排名
    public int ranking() {
        return (int) (Math.random() * 100);
    }
}
